import Layout from '../../layout/DefaultLayout'

const layout = function (meta = {}, name = null) {
  return {
    path: '/sys' + (name !== null ? '/' + name : ''),
    name: name,
    component: Layout,
    meta: {
      ...meta
    }
  }
}
export default [{
  ...layout({title: '后台管理', icon: 'el-icon-setting'}, 'systemManage'),
  children: [
    {
      name: 'position',
      path: 'position', // 职位管理
      component: () => import('@/views/system/position_right'),
      meta: {title: '职位管理', icon: 'el-icon-connection'}
    },
    {
      path: 'emp_dept',
      name: 'empAndDept', // 员工管理
      component: () => import('@/views/system/emp_dept'),
      meta: {title: '员工管理', icon: 'el-icon-office-building'}
    },
    {
      name: 'company',
      path: 'company', // 公司管理
      component: () => import('@/views/system/company'),
      meta: {title: '公司管理', icon: 'el-icon-c-scale-to-original'}
    },
    {
      name: 'logistic',
      path: 'logistic', // 物流公司
      component: () => import('@/views/system/logistic'),
      meta: {title: '物流公司', icon: 'el-icon-set-up'}
    },
    {
      name: 'menu',
      path: 'menu', // 菜单管理
      component: () => import('@/views/system/menu'),
      meta: {title: '菜单管理', icon: 'el-icon-menu'}
    },
    {
      name: 'dict',
      path: 'dict', // 数据字典
      component: () => import('@/views/system/dict'),
      meta: {title: '数据字典', icon: 'el-icon-s-grid'}
    }
  ]
}]
